/**
 * Created by Administrator on 2017-2-24.
 */
var app = global.app = require('express')();
var imitator = require('./imitator');
var bodyParser = require('body-parser');
app.use(bodyParser.json({ limit: '1mb' }));  //body-parser 解析json格式数据
app.use(bodyParser.urlencoded({            //此项必须在 bodyParser.json 下面,为参数编码
  extended: true
}));

var port = 3001;

require('./demo/index.js')(imitator)
require('./layout/index.js')(imitator)



imitator.base("http://localhost:3000");//calc
app.listen(port);
console.log("代理服务器开启localhost:" + port);